home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / TrickyClickyBall.swf / scripts / frame_3 / PlaceObject2_189_18 / CLIPACTIONRECORD onClipEvent(enterFrame).as
Encoding:
Text File  |  2005-09-27  |  498 b   |  25 lines

  1. onClipEvent(enterFrame){
  2.    if(_root.balls == 1)
  3.    {
  4.       this._x = random(-300) + 20;
  5.       this._y = random(-300) + 20;
  6.    }
  7.    xPos = random(2) + 1;
  8.    switch(xPos)
  9.    {
  10.       case 1:
  11.          this._x += random(12) + 5;
  12.          if(this.hitTest(_root.wall2))
  13.          {
  14.             this._x -= 13;
  15.          }
  16.          break;
  17.       case 2:
  18.          this._x -= random(12) + 5;
  19.          if(this.hitTest(_root.wall2))
  20.          {
  21.             this._x += 13;
  22.          }
  23.    }
  24. }
  25.